package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectAuthAddRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-20
 * @Version: 1.0
 * Table: pear_project_auth
 * Comment:
 * 项目权限表
 */
public class ProjectAuthAddRequestConvert extends BaseConvert {
    public static ProjectAuthWithBLOBs convert(ProjectAuthAddRequest request) throws Exception {
        ProjectAuthWithBLOBs daoRequest = new ProjectAuthWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setTitle(daoRequest.getTitle() == null ? null : daoRequest.getTitle().trim());
        daoRequest.setDesc(daoRequest.getDesc() == null ? null : daoRequest.getDesc().trim());
        daoRequest.setCreateAt(daoRequest.getCreateAt() == null ? null : daoRequest.getCreateAt().trim());
        daoRequest.setOrganizationCode(daoRequest.getOrganizationCode() == null ? null : daoRequest.getOrganizationCode().trim());
        daoRequest.setType(daoRequest.getType() == null ? null : daoRequest.getType().trim());

        return daoRequest;
    }
}
